package com.sjtu.vfact.textual.model;

import com.sjtu.vfact.visualization.base.VfactVertex;

public class Document extends VfactVertex{
	
	private int id;
	
	public Document(int id, String line){
		super(line.split(" "));
		this.id = id;
	}
	
	public Document(int id, String[] terms){
		super(terms);
		this.id = id;
	}

	public int getId() {
		return id;
	}
	
	@Override
	public String toString() {
		String t = "";
		for(int i = 0; i < terms.size() ; i++){
			if(i == terms.size() - 1){
				t += terms.get(i);
			}else{
				t += terms.get(i) + ", ";
			}
		}
		String s = "DocID : " + id + "\tTerms : " + t;
		return s;
	}
	
}
